package Util;/*
 *徐韬
 *2021/9/20
 *15:41
 */

public class Page {
    private Integer pageIndex;
    private Integer pagesize;
    private  Integer startow;
    private  Long totalcount;
    private Long totalpage;
    public Page(Integer pageIndex) {
        this.pageIndex = pageIndex;
        this.pagesize=5;
        this.startow = (this.pageIndex-1) * this.pagesize;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Long getTotalcount() {
        return totalcount;
    }

    public void setTotalcount(Long totalcount) {
        this.totalcount = totalcount;
        this.totalpage = this.totalcount % this.pagesize==0?this.totalcount / this.pagesize : this.totalcount / this.pagesize +1;


    }

    public Integer getPagesize() {
        return pagesize;
    }

    public Integer getStartow() {
        return startow;
    }

    public Long getTotalpage() {
        return totalpage;
    }



}
